package com.lfy.fyadmin.common;

public enum ErrorCode {
    SUCCESS(200, "操作成功"),
    FAILED(500, "操作失败"),
    PARAM_ERROR(400, "参数错误"),
    UNAUTHORIZED(401, "未认证/未登录"),
    FORBIDDEN(403, "无权限"),
    NOT_FOUND(404, "数据不存在"),
    SERVER_ERROR(500, "服务器内部错误"),
    VALIDATE_FAILED(422, "参数校验失败"),
    REPEAT_SUBMIT(409, "重复提交"),
    BUSINESS_ERROR(600, "业务异常");

    private final int code;
    private final String msg;

    ErrorCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
} 